#ifndef __AIRONIXESTREAM_H_
#define __AIRONIXESTREAM_H_
#include "AironixParser.h"
#include "x_time.h"

#include "config.h"
#include "tmTransDefine.h"
#include "tmControlClient.h"

class CAironixStreamBase : public J_MediaStream
{};

class CAironixStream : public J_BaseVideoStream<CAironixStreamBase>
{
	friend class CAironixChannel;
public:
	CAironixStream(std::string resid, int nChannel);
	~CAironixStream();

public:
	///J_VideoStream
	virtual int Startup();
	virtual int Shutdown();

protected:
	static int OnStreamCallBack(HANDLE hHandle, tmRealStreamInfo_t *streamInfo, void *context)
	{
		CAironixStream *pThis = static_cast<CAironixStream *>(context);
		if (pThis != NULL)
			pThis->OnRecv(hHandle, streamInfo);

		return 0;
	}

private:
	void OnRecv(HANDLE hHandle, tmRealStreamInfo_t *streamInfo);

private:
	CTime m_time;
	bool m_bStartup;
};

#endif //~__AIRONIXESTREAM_H_
